﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AllInOne.Pages
{
    /// <summary>
    /// ConfirmCarInfoPage.xaml 的交互逻辑
    /// </summary>
    public partial class ConfirmCarInfoPage : Page
    {

        private MainWindow parent;

        public ConfirmCarInfoPage()
        {
            InitializeComponent();
        }

        public ConfirmCarInfoPage(MainWindow parent)
        {
            InitializeComponent();
            this.parent = parent;
        }


        public void InitPage() {
            this.imgTitle.Source = new BitmapImage(new Uri(this.parent.businessInfo.getImgTitleUrl()));

            this.txtHphm.Text = "号牌号码: " + this.parent.carInfo.hphm;
            this.txtSyr.Text = "所有人：" + this.parent.carInfo.syr;
            this.txtLxdz.Text = "联系地址: " + this.parent.carInfo.zsxxdz;
            this.txtPpxh.Text = "品牌型号: " + this.parent.carInfo.clpp1 + this.parent.carInfo.clxh;
            this.txtFdjh.Text = "发动机号: " + this.parent.carInfo.fdjh; 
            this.txtClsbdh.Text = "车辆识别代号: " + this.parent.carInfo.clsbdh;

            this.parent.PlaySound(Properties.Resources.male_confirm_car_info, Properties.Resources.female_confirm_car_info);

        }

        private void BtnConfirm_MouseUp(object sender, MouseButtonEventArgs e)
        {
            this.parent.ShowSignPad();
        }

        private void BtnBackToIndex_MouseUp(object sender, MouseButtonEventArgs e)
        {
            this.parent.ResetIndex();
        }
    }
}
